﻿Public Class UploadVideoToCruises
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        ''  Session("cid") = 1
    End Sub

    Private Sub FormView1_ItemInserting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.FormViewInsertEventArgs) Handles FormView1.ItemInserting
        Dim fileupload1 As FileUpload = CType(Me.FormView1.FindControl("fileupload1"), FileUpload)


        If fileupload1.HasFile = True Then
            '  fileupload1.SaveAs(MapPath(fileupload1.FileName))
            Dim filepath As String = fileupload1.PostedFile.FileName

            fileupload1.PostedFile.SaveAs(Server.MapPath(".\") & filepath)
            Session("fileupload") = fileupload1.FileName

        End If
    End Sub
End Class